<?php

/**
 * 客户信息管理
 * @copyright   Copyright (c) 2006 - 2010 DZH 友拓软件友拓通
 * @category    基本信息
 * @package   Model
 * @author     庄敏学
 * @version  2.1,2012-07-22
 */

class ClientPublicModel extends CommonModel {
	
	/// 模型名与数据表名不一致，需要指定
	protected $tableName = 'company';
	
	/// 自动验证设置
	protected $_validate	 =	 array(
		array("detail_type",'require',"require",0),
		array("comp_no",'require',"require",1),
		array("comp_no",'is_no',"valid_error",1),  
		array("comp_no",'',"unique",1,'unique',3,array('comp_type'=>1)),//验证唯一	
		array("comp_name",'require',"require",1),
		array("comp_name",'',"unique",1,'unique',3,array('comp_type'=>1)),//验证唯一 
		array("iva",array(0,99),'iva_error','2','between'),
		array('iva','double','double',2),
		array("remind_day","pst_integer","valid_money",2),//催款天数
		array("remind_money",'currency',"valid_money",2),//信用额度
		array('email','email','valid_email',2),	//邮箱格式
		); 
		
}